<?
class sites_admin
{
	var $template="list";
	
	function Render()
	{
		$form = new Form();
		$form->table = "sites";
		
		$form->Add(new     Str("title",    "Название"    ));
		$form->Add(new     Str("url", "URL (без http://www. и слеша в конце)" ));
		$form->Add(new  ValidatorNotEmpty("title","Введите название" ));
		$form->Add(new  ValidatorNotEmpty("newvalue","Введите URL" ));
		
		$html_form = $form->Render();
		
		$dao = Array();
		
		$pagerSelect = new Pager("select * from sites" );
		$pagerSelect->def_sortby="title";
		$dao["rows"] = $pagerSelect->GetRows();
		$dao["pager"] = $pagerSelect->RenderPager();
		$dao["listinfo"] = "URL: <*url*>";
		$dao["listtitle"] = GetAdminTitle();
		
		$html_list = TemplaterParse(GetAdminTemplate($this->template),$dao);
		
		echo RenderAdmin($html_form,$html_list);
	}
}
?>